﻿<Window x:Class="BitConversion.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Bit Conversion Helper" Height="350" Width="525" Loaded="Window_Loaded">
    <Grid>
        <StackPanel Margin="3">
            <StackPanel Orientation="Horizontal">
                <ComboBox Name="cbo_Conversion" Width="150" HorizontalAlignment="Left" SelectedIndex="0">
                    <ComboBoxItem>UInt16 to Byte[]</ComboBoxItem>
                    <ComboBoxItem>Byte[] to UInt16</ComboBoxItem>
                    <ComboBoxItem>UInt32 to Byte[]</ComboBoxItem>
                    <ComboBoxItem>Byte[] to UInt32</ComboBoxItem>
                    <ComboBoxItem>Float to Byte[]</ComboBoxItem>
                    <ComboBoxItem>Byte[] to Float</ComboBoxItem>
                </ComboBox>
                <Label Name="lbl_Description"></Label>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <CheckBox Name="chk_ByteSwap" ToolTip="Should the bytes be swapped? Swaps each 'pair' of bytes. Particularly useful for floats wherein the conversion often requires a float in the format B A D C instead of A B C D.">Byte Swap?</CheckBox>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBox Name="txt_Value" Width="100" />
                <Button Name="btn_Calculate" Click="btn_Calculate_Click">Submit</Button>
            </StackPanel>
            <TextBlock>Result:</TextBlock>
            <TextBox Name="txt_Result" Height="Auto" MinHeight="150" MouseDoubleClick="txt_Result_MouseDoubleClick"></TextBox>
            
            <StackPanel Orientation="Horizontal" ToolTip="This is the raw hardware architecture endianess and does not take into account the Byte Swap checkbox above.">
                <Label>Architecture Endianess:</Label>
                <Label Name="lbl_Endianess" />
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>
